package com.situ.springboot.service.impl;

import com.situ.springboot.mapper.DeptMapper;
import com.situ.springboot.pojo.Dept;
import com.situ.springboot.service.IDeptService;
import com.situ.springboot.vo.DeptCount;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class DeptServiceImpl implements IDeptService {
    @Autowired
    private DeptMapper deptMapper;

    @Override
    public List<Dept> selectAll() {
        List<Dept> list = deptMapper.selectAll();
        return list;
    }

    @Override
    public void deleteById(Integer id) {
        deptMapper.deleteById(id);
    }

    @Override
    public void add(Dept dept) {
        deptMapper.add(dept);
    }

    @Override
    public Dept selectById(Integer id) {
        return deptMapper.selectById(id);
    }

    @Override
    public void update(Dept dept) {
        deptMapper.update(dept);
    }

}
